﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class cajasFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As CajasBE
        Dim tmpCajas As CajasBE = New CajasBE()
        Try
            With tmpCajas
                .IdC = convertDTFromDb.convertInt32(dr.Item("IdC"))
                .IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .Nombre = convertDTFromDb.ConvertString(dr.Item("Nombre"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Cobra = convertDTFromDb.convertInt32(dr.Item("Cobra"))
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))

            End With
            Return tmpCajas
        Catch ex As Exception
            Throw
        Finally
            tmpCajas = Nothing
        End Try
    End Function
End Class
